﻿using System;
using System.Linq;
using System.Web.Mvc;
using System.Web.Security;
using GiaoXuLanTranh_MucVu.Models;
using InfoTech.LanTranh.MucVu.Service;

namespace GiaoXuLanTranh_MucVu.Areas.AdminCP.Controllers
{
    [Authorize]
    public class AdminCPController : Controller
    {
        //
        // GET: /AdminCP/AdminCP/

        public ActionResult Index()
        {
            Header header = new Header();
            header.PageTitle = "Báo cáo - Mục Vụ";
            header.PageHeader = " ";
            header.Menulv1 = "00";
            ViewData[Header.Key] = header;

            return View();
        }

        public ActionResult SignOut()
        {
            Session.Clear();
            Response.Cookies.Clear();
            Request.Cookies.Clear();
            FormsAuthentication.SignOut();
            return RedirectToAction("Index");
        }

        [HttpPost]
        public ActionResult GetHoGiaDinh(string id)
        {
            return Json(HOGIADINHService.List(id), JsonRequestBehavior.DenyGet);
        }
    }
}
